<template>
	<view class="wrapper">
		<view class="hahaha">
			<view class="box" v-for="(item,index) in titlecontext">
				<view class="left">
					<view class="left_title_a">
						<view class="left_title" v-html="item.title1" @tap="change(index)" :class="{active:index==reindex}"></view>
					</view>
					<view class="right">
						<view class="rm" v-html="item.title1"></view>
						<view class="rm-aa" v-for="(item001,index001) in item.childen" v-show="item.childen.length&&index==reindex" @tap="diancan">
							<view class="tz" >
								<view class="tp1">
									<img :src="item001.tp1" alt="图片错误">
								</view>
								<view class="tz2">
									<view class="jt">{{item001.jt}}</view>
									<view class="aoe">{{item001.aoe}}</view>
									<view class="ys">{{item001.ys}}</view>
									<view class="jg">￥{{item001.jg}}/份</view>
									<view class="zk">{{item001.zk}}</view>
									<view class="jsq">
										<button class="subjsq" @tap="sub(index,index001,item001.mount)">
											-
										</button>
										<view>{{item001.mount}}</view>
										<button class="subjsq" @tap="add(index,index001,item001.mount)">
											+
										</button>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="shangjia">
				<!-- <view class="title_1">
					<uni-icon type="chat" size="20"></uni-icon><br/>
					<view class="titleText">联系商家</view>
				</view> -->
				<view class="title_3">
					<button class="titleText" @click="goShopCar">加入购物车 </button>
				</view>
				<view class="title_2" @click="viewKey_f">
					<image :src="pic_src"></image>
					<view>
						￥{{sum}}
					</view>
				</view>
				<view class="title_3">
					<button class="titleText" @click="enter">立即支付</button>
				</view>
			</view>
			
			<!-- 购买调整 -->
			<view v-show="viewKey">
				<view class="choose">
					<view style="flex: 1;background-color: #000;opacity: .5;" @click="viewKey_f"></view>
					<view class="box_box">
						<view class="box" v-for="(item,index) in titlecontext">
							<view>
								<view class="rm-aa" v-for="(item001,index001) in item.childen" v-show="item.childen.length&&index==reindex&&item001.mount" @tap="diancan">
									<view class="tz" >
										<view class="tp1">
											<img :src="item001.tp1" alt="图片错误">
										</view>
										<view class="tz2">
											<view class="jt">{{item001.jt}}</view>
											<view class="jg">￥{{item001.jg*item001.mount}}</view>
											<view class="jsq">
												<button class="subjsq" @tap="sub(index,index001,item001.mount)">
													-
												</button>
												<view>{{item001.mount}}</view>
												<button class="subjsq" @tap="add(index,index001,item001.mount)">
													+
												</button>
											</view>
										</view>
									</view>
								</view>
							</view>
						</view>
						
					</view>
						
				</view>
				
			</view>
		</view>
	</view>
</template>

<script>
	import {
	    mapState,
	    mapMutations
	} from 'vuex'
	import uniIcon from "../uni-icon/uni-icon.vue"
	export default {
		components: {uniIcon},
		computed: mapState(['forcedLogin', 'userName']),
		data() {
			return {
				titlecontext:[
					{
						title1:'热卖',
						childen:[
							{
								tp1:'http://img2.imgtn.bdimg.com/it/u=4276076153,1401269833&fm=26&gp=0.jpg',
								jt:'奥尔良鸡腿堡',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售420 赞5',
								zk:'0.71折 限1份 2份起购',
								jg:1.99,
								mount:0,
							},
							{
								tp1:'http://img0.imgtn.bdimg.com/it/u=3860002376,4084574030&fm=26&gp=0.jpg',
								jt:'麻辣豆腐',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售220 赞15',
								jg:6.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img5.imgtn.bdimg.com/it/u=2100654638,1369728777&fm=26&gp=0.jpg',
								jt:'素炒细面',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:5.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								rm:'叫了只鸡',
								tp1:'https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1799264791,2117008812&fm=26&gp=0.jpg',
								jt:'叫了只炸鸡',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售4020 赞500',
								jg:7.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
								
							},
						]
					},
					{
						title1:'折扣',
						childen:[
							{
								rm:'满减专区',
								tp1:'http://img3.imgtn.bdimg.com/it/u=3038768514,1720405735&fm=26&gp=0.jpg',
								jt:'炒肉片',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售120 赞5',
								jg:1.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
								
							},
							{
								rm:'进店必点',
								tp1:'http://img4.imgtn.bdimg.com/it/u=2451195952,1434338382&fm=26&gp=0.jpg',
								jt:'烤香肠',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售320 赞54',
								jg:4.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
								
							},
							{
								rm:'家庭套餐',
								tp1:'http://img4.imgtn.bdimg.com/it/u=1951997671,3890603425&fm=26&gp=0.jpg',
								jt:'蛋炒饭',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售620 赞53',
								jg:6.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
								
							},
							{
								rm:'啤酒炸鸡',
								tp1:'https://f10.baidu.com/it/u=3482215282,1585577056&fm=72',
								jt:'炸鸡啤酒店',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞58',
								jg:7.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
								
							},
						]
					},
					{
						
						title1:'买赠',
						childen:[
							
							{
								rm:'精选饮料',
								tp1:'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2897880905,2584695437&fm=26&gp=0.jpg',
								jt:'饮料',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售1420 赞532',
								jg:17.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
								
							},
							{
								rm:'可口可乐',
								tp1:'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1292556052,182680624&fm=26&gp=0.jpg',
								jt:'可口可乐',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售4020 赞536',
								jg:14.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
								
							},
							{
								rm:'鸡&伴侣',
								tp1:'http://img5.imgtn.bdimg.com/it/u=3203469423,2648938914&fm=26&gp=0.jpg',
								jt:'特好吃',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售3420 赞54',
								jg:15.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
								
							},
							{
								tp1:'http://img5.imgtn.bdimg.com/it/u=2100654638,1369728777&fm=26&gp=0.jpg',
								jt:'素炒细面',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:4.9,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							}
						]
					},
					{
						title1:'叫了只鸡',
						childen:[
							{
								tp1:'http://img5.imgtn.bdimg.com/it/u=2100654638,1369728777&fm=26&gp=0.jpg',
								jt:'素炒细面',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:1.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img0.imgtn.bdimg.com/it/u=3803955261,927096685&fm=26&gp=0.jpg',
								jt:'叫了只鸡',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:10.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img3.imgtn.bdimg.com/it/u=2605373761,2281119648&fm=26&gp=0.jpg',
								jt:'叫了只鸡(麻辣)',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:13.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img2.imgtn.bdimg.com/it/u=1306955412,988083962&fm=26&gp=0.jpg',
								jt:'叫了只鸡(黑胡椒)',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:18.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img5.imgtn.bdimg.com/it/u=1008894142,599833933&fm=26&gp=0.jpg',
								jt:'叫了只鸡(原味)',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:16.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							
						]
					},
					{
						title1:'满减专区',
						childen:[
							{
								tp1:'http://img2.imgtn.bdimg.com/it/u=2427388158,799771484&fm=26&gp=0.jpg',
								jt:'奥尔良鸡肉卷',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:15.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img1.imgtn.bdimg.com/it/u=751881730,2640271041&fm=26&gp=0.jpg',
								jt:'墨西哥鸡肉卷',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:18.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img5.imgtn.bdimg.com/it/u=1615029711,2149162844&fm=26&gp=0.jpg',
								jt:'老北京鸡肉卷',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:11.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img3.imgtn.bdimg.com/it/u=1748267283,4027343464&fm=26&gp=0.jpg',
								jt:'香辣鸡腿堡',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:10.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							}
						]
					},
					{
						title1:'进店必点',
						childen:[
							{
								tp1:'http://img3.imgtn.bdimg.com/it/u=3695100841,2806982550&fm=26&gp=0.jpg',
								jt:'小酥肉',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:16.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img5.imgtn.bdimg.com/it/u=2100654638,1369728777&fm=26&gp=0.jpghttp://img0.imgtn.bdimg.com/it/u=551330457,3732026589&fm=26&gp=0.jpg',
								jt:'网红芝士热狗棒',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:4.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img1.imgtn.bdimg.com/it/u=1217088486,1376429107&fm=26&gp=0.jpg',
								jt:'甘梅地瓜条',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:9.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img5.imgtn.bdimg.com/it/u=532566352,3453655357&fm=26&gp=0.jpg',
								jt:'黄金双皮奶',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:15.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img0.imgtn.bdimg.com/it/u=183668496,3240803640&fm=26&gp=0.jpg',
								jt:'玉米布丁(6个)',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:13.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							}
						]
					},
					{
						title1:'家庭套餐',
						childen:[
							{
								tp1:'http://img0.imgtn.bdimg.com/it/u=409883039,621197161&fm=26&gp=0.jpg',
								jt:'欢乐全家桶',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:146.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img4.imgtn.bdimg.com/it/u=3827816851,3616002805&fm=26&gp=0.jpg',
								jt:'炸鸡套餐',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:172.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img5.imgtn.bdimg.com/it/u=1593531197,2774388892&fm=26&gp=0.jpg',
								jt:'网红辣酱',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:45.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img4.imgtn.bdimg.com/it/u=3928417679,3059384601&fm=26&gp=0.jpg',
								jt:'老回味酸梅汤',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:41.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							}
						]
					},
					{
						title1:'啤酒炸鸡',
						childen:[
							{
								tp1:'https://f10.baidu.com/it/u=2963243251,4011134796&fm=72',
								jt:'炸鸡啤酒',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:4.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img5.imgtn.bdimg.com/it/u=2021294246,2528902735&fm=26&gp=0.jpg',
								jt:'炸鸡啤酒',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:8.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img0.imgtn.bdimg.com/it/u=2735934067,3580780539&fm=26&gp=0.jpg',
								jt:'炸鸡啤酒',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:9.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img5.imgtn.bdimg.com/it/u=4163968378,4210253681&fm=26&gp=0.jpg',
								jt:'炸鸡啤酒',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:13.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							}
						]
					},
					{
						title1:'精选饮料',
						childen:[
							{
								tp1:'http://img5.imgtn.bdimg.com/it/u=2100654638,1369728777&fm=26&gp=0.jpg',
								jt:'素炒细面',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:1.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img2.imgtn.bdimg.com/it/u=808915093,2817994561&fm=15&gp=0.jpg',
								jt:'小鸡饮品',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:11.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img4.imgtn.bdimg.com/it/u=1651210524,2431668382&fm=15&gp=0.jpg',
								jt:'小鸡饮品',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:14.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img1.imgtn.bdimg.com/it/u=2983898989,2111059342&fm=26&gp=0.jpg',
								jt:'可口可乐',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:61.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
						]
					},
					{
						title1:'可口可乐',
						childen:[
							{
								tp1:'http://img1.imgtn.bdimg.com/it/u=2983898989,2111059342&fm=26&gp=0.jpg',
								jt:'可口可乐',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:61.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img2.imgtn.bdimg.com/it/u=1302761685,1513557671&fm=26&gp=0.jpg',
								jt:'可口可乐',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:71.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img3.imgtn.bdimg.com/it/u=1838129533,3540018858&fm=26&gp=0.jpg',
								jt:'可口可乐',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:21.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img5.imgtn.bdimg.com/it/u=507358295,3976804558&fm=26&gp=0.jpg',
								jt:'可口可乐',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:41.9,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							}
						]
					},
					{
						title1:'鸡&伴侣',
						childen:[
							{
								tp1:'http://img4.imgtn.bdimg.com/it/u=788102062,2380574916&fm=15&gp=0.jpg',
								jt:'小鸡饮品',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:31.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img0.imgtn.bdimg.com/it/u=2273460886,2412866280&fm=15&gp=0.jpg',
								jt:'小鸡饮品',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:71.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img2.imgtn.bdimg.com/it/u=808915093,2817994561&fm=15&gp=0.jpg',
								jt:'小鸡饮品',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:11.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img4.imgtn.bdimg.com/it/u=1651210524,2431668382&fm=15&gp=0.jpg',
								jt:'小鸡饮品',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:14.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							}
						]
					},
					{
						title1:'点鸡必看',
						childen:[
							{
								tp1:'http://img5.imgtn.bdimg.com/it/u=1853625116,2587339681&fm=15&gp=0.jpg',
								jt:'鸡块土豆',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:16.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img2.imgtn.bdimg.com/it/u=1269026893,3814317413&fm=15&gp=0.jpg',
								jt:'卤鸡肉',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:18.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img1.imgtn.bdimg.com/it/u=1389768851,3932644500&fm=26&gp=0.jpg',
								jt:'鸡块',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:17.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							{
								tp1:'http://img5.imgtn.bdimg.com/it/u=3136252750,1006156441&fm=26&gp=0.jpg',
								jt:'炸鸡翅',
								aoe:'奥尔良/鸡腿肉/面包片',
								ys:'月售400 赞111',
								jg:14.99,
								mount:0,
								zk:'0.71折 限1份 2份起购',
							},
							
						]
					},
				],
				reindex:0,
				title2:'满20减20；满30减28；满45减38；满88减52；满108减60；',
				viewKey:false,
				list0001:[],
				relist0002:[],
				title0001:'',
				shop_list0001:[],
				shop_relist0002:[],
				shop_title0001:'',
				
				pic_src:''
			}
		},
		methods: {
			...mapMutations(['addorderlist','shopCarList','shopCarList_ture']),
			change(value){
				this.reindex = value;
			},
			diancan(){
				if(!this.hasLogin){
					uni.showModal({
						title: '未登录',
						content: '您未登录，需要登录后才能继续',
						/**
						 * 如果需要强制登录，不显示取消按钮
						 */
						showCancel: !this.forcedLogin,
						success: (res) => {
							if (res.confirm) {
								/**
								 * 如果需要强制登录，使用reLaunch方式
								 */
								if (this.forcedLogin) {
			   						uni.reLaunch({
										url: '../login/login'
									});
								} else {
									uni.navigateTo({
									   url: '../login/login'
									});
								}
							}
						}
					});
				}
			},
			// 计数器
			add(index,index001,value){
				this.titlecontext[index].childen[index001].mount++;
			},
			sub(index,index001,value){
				if(value>0){
					this.titlecontext[index].childen[index001].mount--;
				}
			},
			
			// 确认支付
			enter(){
				const _this = this;
				// 订单支付页
				for (let i=0;i<_this.titlecontext.length;i++) {
					for(let j=0;j<_this.titlecontext[i].childen.length;j++){
						if(_this.titlecontext[i].childen[j].mount){
							_this.list0001.push(_this.titlecontext[i].childen[j])
							_this.title0001 = _this.titlecontext[i].title1;
						}
					}
				}
				for(let i=0;i<_this.list0001.length;i++){
					_this.relist0002.push(
						{
							src:_this.list0001[i].tp1,
							content:_this.list0001[i].jt,
							num:_this.list0001[i].mount,
							nowmoney:_this.list0001[i].mount*_this.list0001[i].jg,
							oldmoney:(_this.list0001[i].mount*_this.list0001[i].jg/0.8).toFixed(2)
						}
					)
				}
				_this.addorderlist(
					[{
						titles:_this.title0001,
						childcommoditylist:_this.relist0002
					}]
					
				)
				
				// 订单页
				// for (let i=0;i<_this.titlecontext.length;i++) {
				// 	for(let j=0;j<_this.titlecontext[i].childen.length;j++){
				// 		if(_this.titlecontext[i].childen[j].mount){
				// 			_this.shop_list0001.push(_this.titlecontext[i].childen[j])
				// 			_this.shop_title0001 = _this.titlecontext[i].title1;
				// 		}
				// 	}
				// }
				// for(let i=0;i<_this.shop_list0001.length;i++){
				// 	_this.shop_relist0002.push(
				// 		{
				// 			img:_this.shop_list0001[i].tp1,
				// 			name:_this.shop_list0001[i].jt,
				// 			nowmoney:_this.shop_list0001[i].mount*_this.shop_list0001[i].jg
				// 		}
				// 	)
				// }
				// _this.shopCarList(
				// 	{
				// 		tp1:'https://cube.elemecdn.com/1/7d/65861fbd5153897019d3c8997412cpng.png?x-oss-process=image/format,webp/resize,w_130,h_130,m_fixed',
				// 		jt:_this.title0001,
				// 		xiaobiaos:['20减10','20减10','20减10','20减10','20减10'],
				// 		wancheng:'已完成',
				// 		num:_this.shop_relist0002.length,
				// 		z_money:_this.z_num,
				// 		huadongs:_this.shop_relist0002
				// 	}
					
				// )
				
				uni.navigateTo({
					url:'../../pages/gouwu/gouwu'
				})
			},
			goShopCar(){
				const _this = this;
				for (let i=0;i<_this.titlecontext.length;i++) {
					for(let j=0;j<_this.titlecontext[i].childen.length;j++){
						if(_this.titlecontext[i].childen[j].mount){
							_this.shopCarList_ture({
								img:_this.titlecontext[i].childen[j].tp1,
								name:_this.titlecontext[i].childen[j].jt,
								num:_this.titlecontext[i].childen[j].mount,
								money:_this.titlecontext[i].childen[j].mount*_this.titlecontext[i].childen[j].jg
							})
						}
					}
				}
				
				uni.navigateTo({
					url:'../../pages/shopCar/shopCar'
				})
			},
			
			viewKey_f(){
				const _this = this;
				for (let i=0;i<_this.titlecontext.length;i++) {
					for(let j=0;j<_this.titlecontext[i].childen.length;j++){
						if(_this.titlecontext[i].childen[j].mount){
							_this.viewKey = !_this.viewKey;
							break;
						};
					}
				}
				
			}
		},
		computed:{
			sum(){
				let sumAA = 0;
				const _this = this;
				for (let i=0;i<_this.titlecontext.length;i++) {
					for(let j=0;j<_this.titlecontext[i].childen.length;j++){
						sumAA += _this.titlecontext[i].childen[j].mount*_this.titlecontext[i].childen[j].jg;
					}
				}
				return sumAA.toFixed(2);
			},
			// z_num(){
			// 	let num = 0;
			// 	const _this = this;
			// 	for (let i=0;i<_this.titlecontext.length;i++) {
			// 		for(let j=0;j<_this.titlecontext[i].childen.length;j++){
			// 			if(_this.titlecontext[i].childen[j].mount){
			// 				num += _this.titlecontext[i].childen[j].mount*_this.titlecontext[i].childen[j].jg
			// 			}
			// 		}
			// 	}
			// 	return num;
			// },
			hasLogin(){
				return this.$store.state.hasLogin;
			}
		}
	}
</script>

<style scoped>
	.hahaha {
		position: relative;
		margin-top: 40upx;
		height: 700upx;
		overflow-y: scroll;	
		margin-bottom: 190upx;
	}
	.left_title_a{
		width: 150upx;
	}
	.wrapper .left .left_title{
		background-color:  #F8F8F8;
		text-align: center;
		font-size: 28upx;
		height: 80upx;
		line-height: 80upx;
		width: 150upx;
	}
	.wrapper .right{
		position: absolute;
		left:170upx;
		top: 0;
	}
	.tz{
		display: flex;
		flex-direction: row;
		margin-top: 30upx;
	}
	.tz2{
		margin-left: 20upx;
	}
	.tp1 img{
		width: 200upx;
		height: 160upx;
	}
	.rm{
		font-size: 28upx;
		background-color: #F0AD4E;
		height: 50upx;
		line-height: 50upx;
		width: 190upx;
		text-align: center;
		border-radius: 10upx;
		margin-top: 5upx;
	}
	.jt{
		font-size: 28upx;
		font-weight: bold;
		margin-top: -6upx;
	}
	.aoe{
		font-size: 24upx;
		margin-top: 5upx;
	}
	.ys{
		font-size: 24upx;
		color: #AAAAAA;
		margin-top: 5upx;
	}
	.zk{
		font-size: 24upx;
		margin-top: 5upx;
	}
	.jg{
		font-size: 28upx;
		color: #FB4E44;
		margin-top: 5upx;
		display: flex;
		justify-content: space-between;
	}
	.active{
		background-color: #FFFFFF !important;
	}
	.shangjia{
		width: 700upx;
		height: 150upx;
		border-radius: 75upx;
		background-color: #000000;
		margin: 25upx;
		position: fixed;
		bottom:10upx;
		left: 0;
		opacity: .8;
		display: flex;
		justify-content: space-between;
		overflow: hidden;
		z-index: 9;
	}
	.shangjia .title_1{
		height: 80upx;
		color: #FFFFFF;
		margin: 35upx;
		text-align: center;
		width: 150upx;
		font-size: 20upx;
		border-right: 3upx solid #FFFFFF ;
	}
	.shangjia .title_2{
		height: 150upx;
		line-height: 150upx;
		color: #FFFFFF;
		text-align: center;
		font-size: 30upx;
		display: flex;
		flex: 1;
	}
	.shangjia .title_2 > image{
		height: 150upx;
		width: 150upx;
	}
	.shangjia .title_2 > view{
		flex: 1;
	}
	.shangjia .title_3{
		height: 100%;
		line-height: 150upx;
		color: #FFFFFF;
		text-align: center;
		width: 185upx;
		font-size: 30upx;
		background-color: #F0AD4E;
		margin: 0;
		padding: 0;
	}
	.shangjia .title_3 .titleText{
		height: 100%;
		line-height: 150upx;
		color: #FFFFFF;
		text-align: center;
		width: 185upx;
		font-size: 30upx;
		background-color: #F0AD4E;
		margin: 0;
		padding: 0;
	}
	.jsq{
		display: flex;
		justify-content: space-between;
	}
	
	.jsq .subjsq{
		width: 60upx;
		height: 60upx;
		line-height: 60upx;
		text-align: center;
		background-color: #F0AD4E;
		color: #FFFFFF;
		border-radius: 50%;
		font-size: 40upx;
		padding: 0;
	}
	
	.choose{
		position: fixed;
		left: 0;
		right: 0;
		top: 0;
		bottom: 0;
		display: flex;
		/* background-color: #000; */
		justify-content: flex-end;
		flex-direction: column;
		z-index: 1;
	}
	
	.choose .box_box{
		width: 750upx;
		border-radius: 5upx;
		background-color: #ffffff;
		/* height: 700upx; */
		padding-bottom: 150upx;
		/* overflow-y: scroll; */
		padding:0 25upx 180upx;
	}
	
	
</style>
	


